package com.demo.springcloud.run;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;

@Component
public class BalenceFeignRunner {
    @Autowired
    FeignClientModule01 module01;

    @Scheduled(cron = "0/1 * * * * ?")
    public void balenceCall(){
        long lnow = System.currentTimeMillis();
        String result = module01.sayHello();
        System.out.println(result+",spend : "+(System.currentTimeMillis() - lnow));
    }

}
